package a.c;

import java.util.Comparator;

public class e
  extends c
{
  q b;
  d e;
  d f;
  d g;
  d h;
  int i;
  int j;
  int k;
  public static boolean l;
  
  protected e(q paramq)
  {
    paramq.j(this);
  }
  
  public e a(q paramq)
  {
    return paramq.i();
  }
  
  public int c()
  {
    return this.i + this.j;
  }
  
  public int d()
  {
    return this.j;
  }
  
  public int e()
  {
    return this.i;
  }
  
  public int f()
  {
    if (z.f == 0) {
      if (this.b.c) {
        this.b.G();
      }
    }
    return this.k;
  }
  
  public q g()
  {
    return this.b;
  }
  
  public d h()
  {
    return this.f;
  }
  
  public d i()
  {
    return this.e;
  }
  
  public d j()
  {
    return this.g;
  }
  
  public d k()
  {
    return this.h;
  }
  
  public m l()
  {
    return new c_();
  }
  
  public m m()
  {
    return new a_();
  }
  
  public m a(d paramd)
  {
    return new a_(paramd);
  }
  
  public m n()
  {
    return new e_();
  }
  
  public m b(d paramd)
  {
    return new e_(paramd);
  }
  
  public w o()
  {
    return new d_();
  }
  
  public w p()
  {
    return new b_();
  }
  
  public w q()
  {
    return new f_();
  }
  
  public d a(e parame)
  {
    int n = z.f;
    int m = z.e;
    if (n == 0) {
      if (parame.j < this.i) {
        return parame.b(this);
      }
    }
    do
    {
      for (d locald = this.f; m == 0; locald = locald.b)
      {
        if (locald == null) {
          break;
        }
        if (n == 0) {
          if (locald.i == parame) {
            return locald;
          }
        }
      }
    } while (n != 0);
    return null;
  }
  
  public d b(e parame)
  {
    int n = z.f;
    int m = z.e;
    if (n == 0) {
      if (parame.i < this.j) {
        return parame.a(this);
      }
    }
    do
    {
      for (d locald = this.e; m == 0; locald = locald.e)
      {
        if (locald == null) {
          break;
        }
        if (n == 0) {
          if (locald.h == parame) {
            return locald;
          }
        }
      }
    } while (n != 0);
    return null;
  }
  
  public d c(e parame)
  {
    d locald = a(parame);
    if (z.f == 0) {
      if (locald == null) {
        locald = b(parame);
      }
    }
    return locald;
  }
  
  public void a(Comparator paramComparator)
  {
    int m = z.f;
    if (m == 0)
    {
      if (this.j <= 1) {
        return;
      }
      if (m != 0) {}
    }
    else
    {
      if (this.j <= 2) {
        if (paramComparator != null) {
          break label54;
        }
      }
      if (m != 0) {
        break label56;
      }
      b(paramComparator, new d[this.j]);
    }
    if (z.e != 0) {
      label54:
      label56:
      b(paramComparator, null);
    }
  }
  
  public void b(Comparator paramComparator)
  {
    int m = z.f;
    if (m == 0)
    {
      if (this.i <= 1) {
        return;
      }
      if (m != 0) {}
    }
    else
    {
      if (this.i <= 2) {
        if (paramComparator != null) {
          break label54;
        }
      }
      if (m != 0) {
        break label56;
      }
      a(paramComparator, new d[this.i]);
    }
    if (z.e != 0) {
      label54:
      label56:
      a(paramComparator, null);
    }
  }
  
  public String toString()
  {
    if (g() != null) {
      return "node index:" + f();
    }
    return "node without a graph";
  }
  
  e(q paramq, int paramInt)
  {
    a(paramq, paramInt);
  }
  
  void a(q paramq, int paramInt)
  {
    a(paramInt);
    this.b = paramq;
  }
  
  void b(q paramq)
  {
    this.b = paramq;
  }
  
  e c(d paramd)
  {
    return paramd.h;
  }
  
  e d(d paramd)
  {
    return paramd.i;
  }
  
  void e(d paramd)
  {
    int m = z.f;
    paramd.f = this.g;
    paramd.b = null;
    if (m == 0) {
      if (this.g != null)
      {
        this.g.b = paramd;
        if (m != 0) {
          return;
        }
        if (z.e == 0) {
          break label51;
        }
      }
    }
    this.f = paramd;
    label51:
    this.g = paramd;
    this.i += 1;
  }
  
  void f(d paramd)
  {
    int m = z.f;
    paramd.b = this.f;
    paramd.f = null;
    if (m == 0) {
      if (this.f != null)
      {
        this.f.f = paramd;
        if (m != 0) {
          return;
        }
        if (z.e == 0) {
          break label51;
        }
      }
    }
    this.g = paramd;
    label51:
    this.f = paramd;
    this.i += 1;
  }
  
  void a(d paramd1, d paramd2, int paramInt)
  {
    int n = z.f;
    int m = z.e;
    label62:
    d locald;
    if (paramInt == 0)
    {
      if (n == 0) {
        if (paramd2 == null)
        {
          e(paramd1);
          if (m == 0) {
            return;
          }
        }
      }
      if (n == 0) {
        if (paramd2 == this.g)
        {
          if (n != 0) {
            break label62;
          }
          e(paramd1);
          if (m == 0) {
            return;
          }
        }
      }
      if (n == 0) {
        if (this.g == null)
        {
          paramd1.f = null;
          paramd1.b = null;
          this.f = (this.g = paramd1);
          if (n != 0) {
            break label143;
          }
          if (m == 0) {
            break label131;
          }
        }
      }
      locald = paramd2.b;
      paramd2.b = paramd1;
      paramd1.b = locald;
      locald.f = paramd1;
      paramd1.f = paramd2;
      label131:
      this.i += 1;
      label143:
      if (m == 0) {}
    }
    else
    {
      if (n == 0) {
        if (paramd2 == null)
        {
          e(paramd1);
          if (m == 0) {
            return;
          }
        }
      }
      if (n == 0) {
        if (paramd2 == this.f)
        {
          if (n != 0) {
            break label194;
          }
          f(paramd1);
          if (m == 0) {
            return;
          }
        }
      }
      label194:
      if (n == 0) {
        if (this.g == null)
        {
          paramd1.f = null;
          paramd1.b = null;
          if (n != 0) {
            break label265;
          }
          this.f = (this.g = paramd1);
          if (m == 0) {
            break label263;
          }
        }
      }
      locald = paramd2.f;
      paramd2.f = paramd1;
      paramd1.f = locald;
      locald.b = paramd1;
      paramd1.b = paramd2;
      label263:
      label265:
      this.i += 1;
    }
  }
  
  void g(d paramd)
  {
    int m = z.f;
    paramd.g = this.h;
    paramd.e = null;
    if (m == 0) {
      if (this.h != null)
      {
        this.h.e = paramd;
        if (m != 0) {
          return;
        }
        if (z.e == 0) {
          break label51;
        }
      }
    }
    this.e = paramd;
    label51:
    this.h = paramd;
    this.j += 1;
  }
  
  void h(d paramd)
  {
    int m = z.f;
    paramd.e = this.e;
    paramd.g = null;
    if (m == 0) {
      if (this.e != null)
      {
        this.e.g = paramd;
        if (m != 0) {
          return;
        }
        if (z.e == 0) {
          break label51;
        }
      }
    }
    this.h = paramd;
    label51:
    this.e = paramd;
    this.j += 1;
  }
  
  void c(d paramd1, d paramd2, int paramInt)
  {
    int n = z.f;
    int m = z.e;
    label62:
    d locald;
    if (paramInt == 0)
    {
      if (n == 0) {
        if (paramd2 == null)
        {
          g(paramd1);
          if (m == 0) {
            return;
          }
        }
      }
      if (n == 0) {
        if (paramd2 == this.h)
        {
          if (n != 0) {
            break label62;
          }
          g(paramd1);
          if (m == 0) {
            return;
          }
        }
      }
      if (n == 0) {
        if (this.h == null)
        {
          paramd1.g = null;
          paramd1.e = null;
          this.e = (this.h = paramd1);
          if (n != 0) {
            break label143;
          }
          if (m == 0) {
            break label131;
          }
        }
      }
      locald = paramd2.e;
      paramd2.e = paramd1;
      paramd1.e = locald;
      locald.g = paramd1;
      paramd1.g = paramd2;
      label131:
      this.j += 1;
      label143:
      if (m == 0) {}
    }
    else
    {
      if (n == 0) {
        if (paramd2 == null)
        {
          g(paramd1);
          if (m == 0) {
            return;
          }
        }
      }
      if (n == 0) {
        if (paramd2 == this.e)
        {
          if (n != 0) {
            break label194;
          }
          h(paramd1);
          if (m == 0) {
            return;
          }
        }
      }
      label194:
      if (n == 0) {
        if (this.h == null)
        {
          paramd1.g = null;
          paramd1.e = null;
          if (n != 0) {
            break label265;
          }
          this.e = (this.h = paramd1);
          if (m == 0) {
            break label263;
          }
        }
      }
      locald = paramd2.g;
      paramd2.g = paramd1;
      paramd1.g = locald;
      locald.e = paramd1;
      paramd1.e = paramd2;
      label263:
      label265:
      this.j += 1;
    }
  }
  
  void i(d paramd)
  {
    int n = z.f;
    int m = z.e;
    if ((n != 0) || (paramd != this.f))
    {
      if (n != 0) {
        break label52;
      }
      paramd.f.b = paramd.b;
      if (m == 0) {}
    }
    else
    {
      this.f = paramd.b;
    }
    label52:
    if ((n != 0) || (paramd != this.g))
    {
      paramd.b.f = paramd.f;
      if (n != 0) {
        return;
      }
      if (m == 0) {}
    }
    else
    {
      this.g = paramd.f;
    }
    this.i -= 1;
  }
  
  void j(d paramd)
  {
    int n = z.f;
    int m = z.e;
    if ((n != 0) || (paramd != this.e))
    {
      if (n != 0) {
        break label52;
      }
      paramd.g.e = paramd.e;
      if (m == 0) {}
    }
    else
    {
      this.e = paramd.e;
    }
    label52:
    if ((n != 0) || (paramd != this.h))
    {
      paramd.e.g = paramd.g;
      if (n != 0) {
        return;
      }
      if (m == 0) {}
    }
    else
    {
      this.h = paramd.g;
    }
    this.j -= 1;
  }
  
  void r()
  {
    this.f = (this.e = this.h = this.g = null);
    this.i = (this.j = 0);
  }
  
  void a(Comparator paramComparator, d[] paramArrayOfd)
  {
    int i2 = z.f;
    int i1 = z.e;
    if (i2 == 0)
    {
      if (this.i < 2) {
        return;
      }
      if (i2 != 0) {}
    }
    else if (this.i == 2)
    {
      if ((i2 != 0) || (paramComparator != null))
      {
        if (paramComparator.compare(this.f, this.g) > 0)
        {
          this.g = this.f;
          this.f = this.g.b;
          this.g.f = this.f;
          this.f.b = this.g;
          this.g.b = (this.f.f = null);
        }
        return;
      }
    }
    int n = this.i;
    int m = 0;
    d locald1 = this.f;
    if (locald1 != null) {}
    while (i2 != 0)
    {
      paramArrayOfd[m] = locald1;
      m++;
      if (i2 != 0) {
        break label188;
      }
      locald1 = locald1.b;
      if (i1 != 0) {
        break label180;
      }
      if (i1 == 0) {
        break;
      }
    }
    l.a(paramArrayOfd, 0, n, paramComparator);
    label180:
    label188:
    d locald2 = this.f = paramArrayOfd[0];
    locald2.f = null;
    m = 1;
    if (m < n)
    {
      locald1 = paramArrayOfd[m];
      locald1.f = locald2;
      locald2.b = locald1;
      m++;
    }
    do
    {
      locald2 = locald1;
      if ((i2 == 0) && (i1 != 0)) {
        return;
      }
      if (i1 == 0) {
        break;
      }
      this.g = locald1;
    } while (i2 != 0);
    locald1.b = null;
  }
  
  void b(Comparator paramComparator, d[] paramArrayOfd)
  {
    int i2 = z.f;
    int i1 = z.e;
    if (i2 == 0)
    {
      if (this.j < 2) {
        return;
      }
      if (i2 != 0) {}
    }
    else if (this.j == 2)
    {
      if ((i2 != 0) || (paramComparator != null))
      {
        if (paramComparator.compare(this.e, this.h) > 0)
        {
          this.h = this.e;
          this.e = this.h.e;
          this.h.g = this.e;
          this.e.e = this.h;
          this.h.e = (this.e.g = null);
        }
        return;
      }
    }
    int n = this.j;
    int m = 0;
    d locald1 = this.e;
    if (locald1 != null) {}
    while (i2 != 0)
    {
      paramArrayOfd[m] = locald1;
      m++;
      if (i2 != 0) {
        break label188;
      }
      locald1 = locald1.e;
      if (i1 != 0) {
        break label180;
      }
      if (i1 == 0) {
        break;
      }
    }
    l.a(paramArrayOfd, 0, n, paramComparator);
    label180:
    label188:
    d locald2 = this.e = paramArrayOfd[0];
    locald2.g = null;
    m = 1;
    if (m < n)
    {
      locald1 = paramArrayOfd[m];
      locald1.g = locald2;
      locald2.e = locald1;
      m++;
    }
    do
    {
      locald2 = locald1;
      if ((i2 == 0) && (i1 != 0)) {
        return;
      }
      if (i1 == 0) {
        break;
      }
      this.h = locald1;
    } while (i2 != 0);
    locald1.e = null;
  }
  
  class f_
    extends e.e_
    implements w
  {
    f_()
    {
      super();
    }
    
    public Object j()
    {
      return this.a.i;
    }
    
    public e d()
    {
      return this.a.i;
    }
  }
  
  class b_
    extends e.a_
    implements w
  {
    b_()
    {
      super();
    }
    
    public Object j()
    {
      return this.a.h;
    }
    
    public e d()
    {
      return this.a.h;
    }
  }
  
  class d_
    extends e.c_
    implements w
  {
    d_()
    {
      super();
    }
    
    public Object j()
    {
      return this.b.a(e.this);
    }
    
    public e d()
    {
      return this.b.a(e.this);
    }
  }
  
  class a_
    implements m
  {
    d a;
    
    a_()
    {
      this.a = e.this.e;
    }
    
    a_(d paramd)
    {
      this.a = paramd;
    }
    
    public boolean e()
    {
      return this.a != null;
    }
    
    public void f()
    {
      this.a = this.a.e;
    }
    
    public void g()
    {
      this.a = this.a.g;
    }
    
    public void b()
    {
      f();
      if ((z.f != 0) || (this.a == null)) {
        h();
      }
    }
    
    public void c()
    {
      g();
      if ((z.f != 0) || (this.a == null)) {
        i();
      }
    }
    
    public void h()
    {
      this.a = e.this.e;
    }
    
    public void i()
    {
      this.a = e.this.h;
    }
    
    public int k()
    {
      return e.this.j;
    }
    
    public Object j()
    {
      return this.a;
    }
    
    public d a()
    {
      return this.a;
    }
  }
  
  class e_
    implements m
  {
    d a;
    
    e_()
    {
      this.a = e.this.f;
    }
    
    e_(d paramd)
    {
      this.a = paramd;
    }
    
    public boolean e()
    {
      return this.a != null;
    }
    
    public void f()
    {
      this.a = this.a.b;
    }
    
    public void g()
    {
      this.a = this.a.f;
    }
    
    public void b()
    {
      f();
      if ((z.f != 0) || (this.a == null)) {
        h();
      }
    }
    
    public void c()
    {
      g();
      if ((z.f != 0) || (this.a == null)) {
        i();
      }
    }
    
    public void h()
    {
      this.a = e.this.f;
    }
    
    public void i()
    {
      this.a = e.this.g;
    }
    
    public int k()
    {
      return e.this.i;
    }
    
    public Object j()
    {
      return this.a;
    }
    
    public d a()
    {
      return this.a;
    }
  }
  
  class c_
    implements m
  {
    boolean a;
    d b;
    
    c_()
    {
      h();
    }
    
    public void f()
    {
      int i = z.f;
      if (i == 0) {
        if (!this.a)
        {
          this.b = this.b.b;
          if (i == 0)
          {
            if (this.b != null) {
              return;
            }
            this.b = e.this.e;
          }
          if (i != 0) {
            break label64;
          }
          this.a = true;
          if (z.e == 0) {
            return;
          }
        }
      }
      label64:
      this.b = this.b.e;
    }
    
    public void g()
    {
      int i = z.f;
      if (i == 0) {
        if (this.a)
        {
          this.b = this.b.g;
          if (i == 0)
          {
            if (this.b != null) {
              return;
            }
            this.b = e.this.g;
          }
          if (i != 0) {
            break label64;
          }
          this.a = false;
          if (z.e == 0) {
            return;
          }
        }
      }
      label64:
      this.b = this.b.f;
    }
    
    public void h()
    {
      int i = z.f;
      this.b = e.this.f;
      if (i == 0) {
        if (this.b == null)
        {
          this.b = e.this.e;
          if (i != 0) {
            break label54;
          }
          this.a = true;
          if (z.e == 0) {
            return;
          }
        }
      }
      label54:
      this.a = false;
    }
    
    public void i()
    {
      int i = z.f;
      this.b = e.this.h;
      if (i == 0) {
        if (this.b == null)
        {
          this.b = e.this.g;
          if (i != 0) {
            break label54;
          }
          this.a = false;
          if (z.e == 0) {
            return;
          }
        }
      }
      label54:
      this.a = true;
    }
    
    public boolean e()
    {
      return this.b != null;
    }
    
    public void b()
    {
      f();
      if ((z.f != 0) || (!e())) {
        h();
      }
    }
    
    public void c()
    {
      g();
      if ((z.f != 0) || (!e())) {
        i();
      }
    }
    
    public Object j()
    {
      return this.b;
    }
    
    public d a()
    {
      return this.b;
    }
    
    public int k()
    {
      return e.this.c();
    }
  }
}



/* Location:           E:\idea\

 * Qualified Name:     a.c.e

 * JD-Core Version:    0.7.0.1

 */